@extends('admin.layout.global')

@section('css-plugins')
    <link href="{{ asset('style/plugins/bootstrap-switch/css/bootstrap3/bootstrap-switch.min.css') }}" rel="stylesheet">
@endsection

@section('css')
    <link href="{{ asset('style/admin/css/custom.css') }}" rel="stylesheet">
@endsection

@section('js-plugins')
    <script src="{{ asset('style/plugins/bootstrap-switch/js/bootstrap-switch.min.js') }}"></script>
@endsection

@section('js')
    <script src="{{ asset('style/admin/js/pages/blankon.form.element.js') }}"></script>
    <script>
        $(function(){
            $("[type='checkbox']").bootstrapSwitch();
        });
    </script>
@endsection

@section('content')
    <div class="body-content animated fadeIn">
        <div class="row">
            <div class="col-md-4">
                <div class="panel rounded shadow" id="leftMove">
                    <div class="panel-heading">
                        <div class="pull-left">
                            <h3 class="panel-title">{{ last($HMENU)->name }} - {{ $store->name }}</h3>
                        </div><!-- /.pull-left -->
                        <div class="pull-right">
                        </div><!-- /.pull-right -->
                        <div class="clearfix"></div>
                    </div><!-- /.panel-heading -->
                    <div class="panel-body">
                        <form method="post">
                            <div class="form-body">
                                {!! csrf_field() !!}
                                <div class="form-group">
                                    <label class="control-label">时间<span class="asterisk">*</span></label>
                                    <input placeholder="" name="time" value="{{ old('time') }}" class="form-control" type="text">
                                    {!! getErrorMsg($errors, 'time') !!}
                                </div>
                                <div class="form-group">
                                    <label class="control-label">配送费<span class="asterisk">*</span></label>
                                    <input placeholder="" name="price" value="{{ old('price') }}" class="form-control" type="text">
                                    {!! getErrorMsg($errors, 'price') !!}
                                </div>
                                <div class="form-group">
                                    <label class="control-label">价格底线<span class="asterisk">*</span></label>
                                    <input placeholder="" name="term" value="{{ old('term') }}" class="form-control" type="text">
                                    {!! getErrorMsg($errors, 'term') !!}
                                </div>
                                <div class="form-group">
                                    <label class="control-label">低于底线配送费<span class="asterisk">*</span></label>
                                    <input placeholder="" name="priceTwo" value="{{ old('priceTwo') }}" class="form-control" type="text">
                                    {!! getErrorMsg($errors, 'priceTwo') !!}
                                </div>
                                <div class="form-group">
                                    <label>是否显示</label><br>
                                    <input type="checkbox" name="display" checked-false data-size="small" data-on-text="{{ getLang('Tips', 'showON') }}" data-off-text="{{ getLang('Tips', 'showOFF') }}" data-label-width="0" data-on-color="success" data-off-color="danger">
                                </div>
                                <div class="row">
                                    <div class="col-md-6">
                                        <a href="{{ action('Admin\Shop\StoreController@getClock', ['storeID' => $store->id]) }}" class="btn btn-warning btn-sm btn-block"><i class="fa fa-reply"></i> <span class="bold">{{ getLang('Tips', 'rollBack') }}</span></a>
                                    </div>
                                    <div class="col-md-6">
                                        <button class="btn btn-primary btn-sm btn-block" type="submit"><i class="fa fa-check"></i>&nbsp;{{ getLang('Tips', 'submit') }}</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div><!-- /.panel-body -->
                </div><!-- /.panel -->
            </div>
        </div><!-- /.row -->
    </div>
@endsection